<template>
  <!--电话弹窗-->
  <div class="popI popW" v-show="isShowIphone">
    <transition
      name="fade"
    >
      <div class="popW-centent" v-show="isShowIphone">
        <p class="popW-title">提示</p>
        <div class="popW-main">
          <p>确定拨打电话：</p>
          <p>{{iphoneNum}} 吗？</p>
        </div>
        <p class="popW-confirm">
          <span @click="closePopW('i')">取消</span>
          <span @click="callIphone()">确定</span>
        </p>
      </div>
    </transition>
  </div>
</template>

<script>
  export default {
    data(){
      return{

      }
    },
    props:['isShowIphone','iphoneNum'],
    methods:{
      closePopW(){
        this.$emit('close','i');
      },
      callIphone(){
        this.$emit('call');
      }
    }
  }
</script>

<style scoped>
  p {
    margin: 0;
  }

  .popW {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
  }

  .popW-centent {
    width: 74%;
    height: 20%;
    background-color: #fff;
    -webkit-border-radius: .5rem;
    -moz-border-radius: .5rem;
    border-radius: .5rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    text-align: center;
  }

  .popW-title {
    width: 100%;
    height: 30%;
    color: #333;
    line-height: 3rem;
    font-size: 16px;
    font-weight: bold;
  }

  .popW-main {
    width: 100%;
    height: 40%;
    color: #666;
    line-height: 3rem;
    font-size: 14px;
  }

  .popW-main a {
    color: #666;
    border: 1px solid #ccc;
    -webkit-border-radius: 1.5rem;
    -moz-border-radius: 1.5rem;
    border-radius: 1.5rem;
    padding: 3px 6px;
    font-size: 12px;
    margin-left: 10px;
    text-decoration: none;
  }

  .popW-confirm {
    width: 100%;
    height: 30%;
    line-height: 2.5rem;
    border-top: 1px solid #eee;
    color: #0bf;
  }

  .popI .popW-main {
    line-height: 1.4rem;
  }

  .popI .popW-confirm {
    line-height: 1rem;
  }

  .popI .popW-confirm span {
    display: inline-block;
    width: 48%;
    height: 40%;
    text-align: center;
    margin-top: 4%;
  }

  .popI .popW-confirm span:first-child {
    color: #999;
    border-right: 1px solid #eee;
  }
</style>
